//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package commands;

import common.ByteStream;

public class PutStuffToRoadsideShopStand extends LogicCommand {
    private static final int cmdId = 32;
    private final int slot;
    private final int inventoryId;
    private final int inventoryCount;
    private final int price;
    private final int advertise;

    public PutStuffToRoadsideShopStand(int tt, int slot, int inventoryId, int inventoryCount, int price, int advertise) {
        super(tt);
        this.slot = slot;
        this.inventoryId = inventoryId;
        this.inventoryCount = inventoryCount;
        this.price = price;
        this.advertise = advertise;
    }

    public int getCommandId() {
        return 32;
    }

    public void encode(ByteStream stream) {
        stream.writeInt(32);
        stream.writeShort(this.slot);
        stream.writeInt(this.inventoryId);
        stream.writeShort(this.inventoryCount);
        stream.writeInt(this.price);
        stream.writeByte((byte)this.advertise);
        stream.writeInt(this.ticksWhenTouch().intValue());
    }
}
